/**
 * 测试用例字段显示配置模型
 *
 * Created by nongzhizhong on 2021/11/15.
 */
const mongoose = require('mongoose');
const { ObjectId } = mongoose.Schema;
/**
 * Export model definition object.
 */
module.exports = {
  creatorId: {
    type: ObjectId,
    require: true,
  },
  projectId: {
    type: ObjectId,
    require: true,
  },
  versionId: {
    type: ObjectId,
    require: true,
  },
  fileId: {
    type: ObjectId,
    require: true,
  },
  functionId: {
    type: ObjectId,
    require: true,
  },
  dataDepth: Number,
  dataType: {
    type: [Number],
    default: [],
  },
  variableType: {
    type: [Number],
    default: [],
  },
  displaySetting: {
    type: String,
    default: '0',
  },
  /**
   * 字段数字进制，入库时用|替代.
   * 例如x|y|z代表x.y.z
   * key为字段路径，暂时仅支持整数类型，value为进制(16或10或8或char)，例如:
   * {
   *    "a|b|c": 16,
   *    "x|y|z": 10,
   * }
   */
  numericalBases: Object,
  foldPattern: {
    type: Number,
    default: 1,
  },
};
